package kz.kstu.scantest.facade.ejb.impl;

import kz.kstu.scantest.business.entity.security.Account;
import kz.kstu.scantest.business.server.api.AccountService;
import kz.kstu.scantest.facade.ejb.api.AccountFacade;

import javax.ejb.Stateless;
import javax.security.auth.login.LoginException;

/**
 * @author Filipp_Stankevich
 *         created: 08.09.11 17:36
 */
@Stateless
public class AccountFacadeBean extends AbstractFacadeBean implements AccountFacade {

    public Account login(String login, String password) throws LoginException {
        return getService(AccountService.class).login(login, password);
    }

    @Override
    public void changePassword(Long accountId, String newPassword) {
        getService(AccountService.class).changePassword(accountId, newPassword);
    }
}
